<?php
/**
 * Created by PhpStorm.
 * User: 1
 * Date: 2017/12/19
 * Time: 9:49
 */

namespace app\admin\validate;


use think\Validate;

class Classroom extends Validate
{
    protected $rule = [
        'classroom_address'=>'require',
        'classroom_type_id'=>'require',
        'classroom_size'=>'require',
        'classroom_acceptance_num'=>'require',
        'classroom_nature_id'=>'require',
        'classroom_condition_id'=>'require',
        'classroom_start_time'=>'require',
        'classroom_owner_name'=>'require',
        'classroom_owner_tel'=>'require',
    ];
    protected $message = [
        'classroom_address.require'=>'教室地址必需填写',
        'classroom_type_id.require'=>'教室类型必需填写',
        'classroom_size.require'=>'教室的面积必需填写',
        'classroom_acceptance_num.require'=>'教室容纳人数必需填写',
        'classroom_nature_id.require'=>'教室性质必需填写',
        'classroom_condition_id.require'=>'教室设备必需填写',
        'classroom_start_time.require'=>'教室使用开始时间必需填写',
        'classroom_owner_tel.require'=>'教室所有者电话必需填写',
    ];
    protected $scene = [
        'add_classroom' => [],
        'edit_classroom' => ['classroom_address','classroom_type_id','classroom_size','classroom_acceptance_num','classroom_nature_id','classroom_condition_id'],
    ];
}